<template>
  <div class="register insurance">
    <div class="page-form my-form my-form-ele-300">
      <el-form :inline="true" ref="form" :model="form" label-width="125px">
        <el-form-item label="巡检单位编码">
          <el-input v-model="form.prtrolUnitCode"></el-input>
        </el-form-item>
        <el-form-item label="保险单位编码">
          <el-input v-model="form.insuranceCode"></el-input>
        </el-form-item>
        <el-form-item label="合同编号">
          <el-input v-model="form.insuranceContract"></el-input>
        </el-form-item>
      </el-form>
    </div>
  </div>
</template>

<script>
  export default {
    data() {
      return {
        form: {
          prtrolUnitCode: '',   // 巡检单位编码
          insuranceCode: '',    // 保险
          insuranceContract: '' // 合同编码
        }
      }
    },
    props: ['insuranceMessage'],
    watch: {
      insuranceMessage(value) {
        this.form = value
      }
    },
    mounted() {
      this.sendInsuranceMsgToParent()
    },
    methods: {
      sendInsuranceMsgToParent: function () {
        this.$emit("listenToInsuranceChildEvent", this.form)
      }
    }
  }
</script>


